package com.junmo.fanbizhidemo.fragment;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.junmo.fanbizhidemo.R;
import com.junmo.fanbizhidemo.adapter.ImageGGAdapter;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by huruihua on 2017/8/25.
 */
public class LoactionFragment extends Fragment {
    private RecyclerView recyclerView;
    private RecyclerView.LayoutManager manager;
    private ImageGGAdapter adapter;
    private List<String> mList;

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.fragment_loaction_layout, container, false);
        findView(view);
        return view;
    }

    private void findView(View view) {
        recyclerView = (RecyclerView) view.findViewById(R.id.loaction_list);
        manager = new LinearLayoutManager(getActivity());
        mList = new ArrayList<>();
        for (int i = 0; i < 12; i++) {
            mList.add("");
        }
        recyclerView.setLayoutManager(manager);
        adapter = new ImageGGAdapter();
        adapter.setmDatas(mList);
        recyclerView.setAdapter(adapter);


    }
}
